x86: Initialize the ACPI "safe" power state to C1.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 28 Jul 2009 15:34:16 +0000 (16:34 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 28 Jul 2009 15:34:16 +0000 (16:34 +0100)
Initialize the ACPI "safe" power state to C1.  This avoids a null
dereference on BIOS tables which define C3 but not C2 or C1.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/arch/x86/acpi/cpu_idle.c

index 98d642f975311708217e97f7545ecbb9199de37d..e6d866fb54d3271e4e5e754632915537e362af93 100644 (file)
@@ -442,6 +442,7 @@ static int init_cx_pminfo(struct acpi_processor_power *acpi_power)
     acpi_power->states[ACPI_STATE_C1].valid = 1;
 
     acpi_power->count = 2;
+    acpi_power->safe_state = &acpi_power->states[ACPI_STATE_C1];
 
     return 0;
 }